package schema

import (
	"../../../deps/lessgo/utilx"
	"../../base"
)

type ServPeer struct {
	base.Peer
	KeeperId   string `json:"keeper_id"`
	KeeperName string `json:"keeper_name"`
	Uptime     string `json:"uptime"`
	//PeerUrl string `json:"peerurl"`
}

type SysInfo struct {
	Id         string     `json:"id"`
	Name       string     `json:"name"`
	Leader     base.Peer  `json:"leader"`
	Version    string     `json:"version"`
	Uptime     int64      `json:"uptime"`
	DataKeyNum int64      `json:"dataKeyNum"`
	DataSize   int64      `json:"dataSize"`
	Peers      []PeerInfo `json:"peers"`
}

type PeerInfo struct {
	base.Peer
	OsInfo utilx.Sysinfo `json:"osinfo"`
}

type ServSetupInit struct {
	KeeperId       string     `json:"keeper_id"`
	KeeperName     string     `json:"keeper_name"`
	KeeperPeerSize int        `json:"keeper_peer_size"`
	Peers          []ServPeer `json:"peers"`
}
